#include <iostream>

class SuperClass1
{
public:
    void display()
    {
        std::cout << "SuperClass1 display() function 调用了" << std::endl;
    }
};

class SuperClass2
{
public:
    void display()
    {
        std::cout << "SuperClass2 display() function 调用了" << std::endl;
    }
};

class SubClass : public SuperClass1, public SuperClass2
{
};

int main(int argc, char const *argv[])
{
    SubClass sub{};

    // sub.display(); // "SubClass::display" is ambiguousC/C++(266) request for member ‘display’ is ambiguous
    sub.SuperClass1::display();
    sub.SuperClass2::display();

    return 0;
}
